Get Mail Messages
AutomatR.Outlook.GetMailMessage
The "Get Mail Messages" activity in AutomatR is part of the Outlook activities package, allowing the retrieval of email messages from Microsoft Outlook. This activity streamlines the process of fetching and filtering emails based on specified criteria, enhancing the efficiency of automation workflows.
Properties
Name | Description |
---|---|
Input | |
Account Name | The name of the Outlook account from which to retrieve mail messages. |
Body Containing | Specifies the body text that the retrieved mail messages should contain. |
Default Folder | The default Outlook folder from which to retrieve mail messages. It is a required argument. |
End Date | Please enter the end date to assist in filtering the emails (example: 2023-07-26 17:00 or 2023-07-26). |
Folder Name | The name of the Outlook folder from which to retrieve mail messages. |
From | Specifies the email address or name of the sender of the retrieved mail messages. |
Get Only Attachments | Retrieve mail messages that have attachments. |
Get Only Unread | Retrieve only unread mail messages. |
Has Attachments | The maximum number of mail messages to retrieve. |
Mark As Read After Get | Mark retrieved mail messages as read. |
Number Of Mails | The name of the Outlook folder from which to retrieve mail messages. |
Sender | Specifies the email address or name of the sender of the retrieved mail messages. |
Start Date | Please enter the start date to assist in filtering the emails (example: 2023-07-26 01:00 or 2023-07-26). |
Subject Containing | Specifies the subject text that the retrieved mail messages should contain. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. |
Optional | |
Delay | Enter the wait time in seconds (Example: 5 seconds, i.e., 5) to start the activity. |
Output | |
Result | A list of MailItem objects representing the retrieved mail messages from Outlook. |
How to use:
- Drag and drop the "Get Mail Messages" activity onto the workflow.
- Configure the properties by specifying the criteria for retrieving mail messages.
- Optionally, configure the delay and customize the display name.
- Execute the workflow to fetch the specified mail messages from Outlook.
Example:
Consider an example where the "Get Mail Messages" activity is used to retrieve unread emails with attachments from the default inbox:
Get Mail Messages:
Display Name: "Fetch Unread Emails with Attachments"
Default Folder: Inbox
Get Only Unread: true
Get Only Attachments: true
Result: retrievedEmails
In this example, the activity retrieves unread emails with attachments from the default inbox, and the result is stored in the retrievedEmails
list for further processing in the workflow.